#!/bin/sh
#desc:Add resource to backup
#type:local
#package:odbackup

# Copyright(c) 2011 OpenDomo Services SL. Licensed under GPL v3 or later

if test -z "$1"; then
	echo "#ERR Missing parameter"
	exit 1
fi

if test -n "$6"; then
	FILENAME="$HOME$2$3$4$5$6.bkl"
	touch $FILENAME || exit 2
	echo $1 >> $FILENAME
	echo "# Resource $1 added to [$FILENAME]"
	/bin/logevent notice odbackup "Resource [$1] added to backup"
	#TODO Ordenar alfabeticamente y eliminar duplicados
else
	echo "usage: `basename $0`"
	echo "	resource	Resource	text	$1"
	echo "	frequency	Frequency	list[daily,weekly,monthly]"
	echo "	compression	Compression	list[none,standard,full]"
	echo "	privacity	Privacity	list[public,restricted,confidential]"
	echo "	importance	Importance	list[normal,high,critical]"
fi
echo 

